﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

/* Generated with http://xmltocs.com/ */
namespace EDMXParserV1
{
    public class FunctionImport
    {
        public FunctionImport()
        {
            Parameters = new List<Parameter>();
        }
        public string Name;
        public string ReturnType;
        public String IsComposable;

        public List<Parameter> Parameters { get; set; }


        public static FunctionImport New(System.Xml.XmlNode Node)
        {
            FunctionImport FunctionImport = new FunctionImport();
            foreach (XmlAttribute Attribute in Node.Attributes)
            {
                switch (Attribute.Name)
                {
                    case "Name":
                        FunctionImport.Name = Attribute.Value;
                        break;
                    case "ReturnType":
                        FunctionImport.ReturnType = Attribute.Value;
                        break;
                    case "IsComposable":
                        FunctionImport.IsComposable = Attribute.Value;
                        break;
                    default:
                        Globals.AttributeSwitchCoder(Attribute);
                        break;
                }

            }

            foreach (XmlNode ChildNode in Node.ChildNodes)
            {
                switch (ChildNode.Name)
                {
                    case "Parameter":

                        Parameter Parameter = Parameter.New( ChildNode);
                        FunctionImport.Parameters.Add(Parameter);
                        break;
                    default:
                        Globals.NodeSwitchCoder(ChildNode);
                        break;
                }
            }
            return FunctionImport;

        }
    }
}
